package com.example.demo13zuulinvoker.service;

import com.example.demo13zuulinvoker.feign.IProviderClient;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Created by yawn on 2017-11-05 16:45
 */
@Service
public class InvokerService {

    @Autowired
    private IProviderClient providerClient;

//    @HystrixCommand(commandKey = "commandCacheKeyTest")  // 同时使用feign和hystrix时，千万不可加这个注解
    public String getCar(int id) {
        return providerClient.getCar(id);
    }

}
